<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<ui:composition template="/WEB-INF/templates/padrao.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="cabecalho">
		<ui:include src="/WEB-INF/templates/menuBibli.xhtml" />
	</ui:define>


	<ui:define name="titulo">
		<h2 style="text-align: center">Confirmar Despache Reserva de Midia</h2>
	</ui:define>



	<ui:define name="conteudo">
		<div class="hero-unit">

			<h:panelGroup rendered="#{pesquisaDespachaReservaMidiaBean.msg.wmsg}">
				<div class="alert alert-warning">
					<button type="button" class="close" data-dismiss="alert">x</button>
					<h4>Atenção!</h4>
					#{pesquisaDespachaReservaMidiaBean.msg.warningMsg}
				</div>
			</h:panelGroup>


			<h:panelGroup rendered="#{pesquisaDespachaReservaMidiaBean.msg.emsg}">
				<div class="alert alert-error">
					<button type="button" class="close" data-dismiss="alert">x</button>
					<h4>Erro!</h4>
					#{pesquisaDespachaReservaMidiaBean.msg.erroMsg}
				</div>
			</h:panelGroup>



			<h:panelGroup rendered="#{pesquisaDespachaReservaMidiaBean.msg.smsg}">
				<div class="alert alert-success">
					<button type="button" class="close" data-dismiss="alert">x</button>
					<h4>Sucesso!</h4>
					#{pesquisaDespachaReservaMidiaBean.msg.sucessMsg}
				</div>
			</h:panelGroup>





			<h:form class="form-signin">

				<fieldset>

					<legend style="color: blue">Dados do Leitor</legend>

					<h:panelGrid columns="2">

						<p:outputLabel value="Id Usuário: " for="idu" />
						<h:inputText id="idu" label="Id Usuário: "
							value="#{pesquisaDespachaReservaMidiaBean.reservaDespache.usuario.id_usuario}"
							required="true"
							requiredMessage="*O Id do Usuário é obrigatório!"
							validatorMessage="*O Id do Usuário deve ter 5 caracteres!">
							<f:validateLength minimum="5" maximum="10" />
						</h:inputText>


						<p:outputLabel value="Senha: " for="seh" />
						<h:inputSecret id="seh" label="Senha"
							value="#{pesquisaDespachaReservaMidiaBean.reservaDespache.usuario.login.senha}"
							required="true"
							requiredMessage="*A Senha do Usuário é Obrigatório!">
							<f:validateLength minimum="6" />
						</h:inputSecret>


					</h:panelGrid>


				</fieldset>





				<fieldset>
					<legend style="color: blue">Dados do Midia</legend>

					<h:panelGrid columns="2">



						<p:outputLabel value="Nº da Reserva: " for="cit" />
						<h:inputText id="cit" label="Nº da Reserva: "
							value="#{pesquisaDespachaReservaMidiaBean.reservaDespache.id_reserva}"
							required="true" requiredMessage="*O Nº da Reserva é obrigatório!"
							readonly="true">
						</h:inputText>




						<p:outputLabel value="Código do Midia: " for="tli" />
						<h:inputText id="tli" label="Código do Midia: "
							value="#{pesquisaDespachaReservaMidiaBean.reservaDespache.midia.cod_item}"
							required="true"
							requiredMessage="*O Título do Midia é obrigatório!">
						</h:inputText>




						<p:outputLabel value="Status: " for="stli" />
						<h:inputText id="stli" label="Status: "
							value="#{pesquisaDespachaReservaMidiaBean.reservaDespache.statusReserva}">
						</h:inputText>





						<p:outputLabel value="Data Reserva: " for="gnr" />
						<h:inputText id="gnr" label="Data Reserva: "
							value="#{pesquisaDespachaReservaMidiaBean.reservaDespache.dt_reserva}">
						</h:inputText>






						<h:commandButton action="#{pesquisaDespachaReservaMidiaBean.Emprestar}"
							value="Confirmar Despache" class="btn btn-large btn-primary" />

						<h:commandButton action="#{pesquisaDespachaReservaMidiaBean.Cancelar}"
							value="Cancelar" class="btn btn-large btn-primary"
							immediate="true" />


					</h:panelGrid>
				</fieldset>
			</h:form>


		</div>

	</ui:define>

</ui:composition>
